package org.dizena.modules.base.web;

import org.dizena.common.pojo.PageReq;
import org.dizena.common.pojo.PageResp;
import org.dizena.modules.base.bean.BaseConfig;
import org.dizena.modules.base.service.BaseConfigService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/v1/base/config")
public class BaseConfigController
{
    @Resource
    private BaseConfigService service;

    @PostMapping("list")
    public PageResp<BaseConfig> list(PageReq req)
    {
        return service.list(req);
    }

    @PostMapping("add")
    public void add(BaseConfig m)
    {
        service.add(m);
    }

    @PostMapping("edit")
    public void edit(BaseConfig m)
    {
        service.edit(m);
    }

    @PostMapping("del")
    public void del(String id)
    {
        service.del(id);
    }

}
